package com.tao.base.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;

/**
 * <p>
 * 拦截@Validated注解的bean进行数据校验
 * </p>
 *
 * @author taohongrun
 * @since 2024/11/4
 */
@Configuration
public class Validated {
    @Bean
    public MethodValidationPostProcessor methodValidationPostProcessor() {
        return new MethodValidationPostProcessor();
    }
}
